﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MovedSweet : MonoBehaviour {
    public GameSweet sweet;

    void Awake() {
        sweet = GetComponent<GameSweet>();
    }
    // Start is called before the first frame update
    void Start() {
        
    }

    // Update is called once per frame
    void Update() {

    }

    //移动位置
    public void Move(int newX,int newY) {
        sweet.X = newX;
        sweet.Y = newY;
        sweet.transform.parent.GetComponent<RectTransform>().anchoredPosition=new Vector2(newX,newY);
    }
}
